<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/static/commons/taglibs.jsp"%>
<%@ include file="/static/commons/meta.jsp"%>
<%@ include file="/static/commons/ecside.jsp"%>
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>${title}</title>
		<script type="text/javascript" src="${ctx}/static/scripts/check_all.js"></script>
		<script type="text/javascript">
			function init(){
				parent.waiting_stop();
			}
			function changeStyle(obj){
			  	ec_showContent(obj,"700px");
			}
		</script>
	</head>
	<body onload="init()">
		<ec:table items="list" var="v" title="" width="100%"
			retrieveRowsCallback="process" filterRowsCallback="process"
			maxRowsExported="1000" pageSizeList="15,30,50,all" useAjax="false"
			rowsDisplayed="15" sortable="false" filterable="false"
			resizeColWidth="true" classic="true" minHeight="200"
			excludeParameters="checkAll,ID_,id"
			toolbarContent="extend status|pagejump|navigation|pagesize|refresh"
			action="${ctx}/billing/list">
			<ec:row style="text-align: center;">
				<%-- <ec:column property="ID_"
					title="<input type='checkbox' name='checkAll' onclick='check_all(this.form,this.form.id)'>"
					style="text-align:center;width:34px;" sortable="false">
					<input type='checkbox' value='${v.order_id}@@${v.opt_user }' name='id' id="id" onclick="check_item(this.form,this.form.id)" ></input>
				</ec:column> --%>
				<ec:column property="serial" title="序号" style="text-align:center;width:30px;">${GLOBALROWCOUNT}</ec:column>
				<ec:column property="order_id" title="订单号" style="width:200px;"><a href="javascript:void(0)" onclick="parent.view('${v.order_id }','${v.opt_user }')">${v.order_id}</a></ec:column>
				<ec:column property="service_user_" title="业务员">${v.service_user}</ec:column>
				<ec:column property="cust_id_" title="用户单位">${v.cust_name}</ec:column>
				<%-- <ec:column property="certificate_id" title="证书清单编号">
					
						<c:forEach items="${v.certificate}" var="equ" varStatus="detail">
							<div width="100px">
								<a href="">证书编号${equ.certificate_id}</a>
							</div>
						</c:forEach>
			
				</ec:column> --%>
				<ec:column property="order_type" title="类型">${v.order_type==1?"检测":v.order_type==2?"维修":""}</ec:column>
				<%-- <ec:column property="detail" title="详情"><span style="color: green;" onclick="">查看详情</span></ec:column> --%>
				<ec:column property="detail" title="检测状态">
					<c:choose>
						<c:when test="${v.order_type==1}">
							${v.order_status==1?"已接单":v.order_status==2?"检测中":v.order_status==3?"已完成":""}
						</c:when>
						<c:when test="${v.order_type==2}">
							${v.order_status==1?"已接单":v.order_status==2?"维修中":v.order_status==3?"已完成":""}
						</c:when>
					</c:choose>
					
				</ec:column>
				<ec:column property="task_date_" title="完成日期">${v.task_date}</ec:column>
				<ec:column property="total_price" title="金额">${v.total_price}</ec:column>
				<ec:column property="status" title="开票状态">
					<c:choose>
						<c:when test="${v.status==null||v.status==0}"><a href="javascript:void(0)" onclick="parent.billing('${v.order_id }','0')">申请开票</a></c:when>
						<c:when test="${v.status==1}"><a href="javascript:void(0)" onclick="parent.billing('${v.order_id }','1')">申请中</a></c:when>
						<c:when test="${v.status==2}"><a href="javascript:void(0)" onclick="parent.view('${v.order_id }','2')">已开票</a></c:when>
						<c:otherwise><a href="javascript:void(0)" onclick="parent.view('${v.order_id }','2')">已开票</a></c:otherwise>
					</c:choose>
				</ec:column>
				<ec:column property="tickets_status" title="发票领取状态">
					<c:choose>
						<c:when test="${v.status<3||v.status==null}">未取票</c:when>
						<c:when test="${v.status==3}">已取票</c:when>
					</c:choose>
				</ec:column>
				<ec:column property="ticket_way" title="方式">
					<c:choose>
						<c:when test="${v.ticket_way==1}">自取</c:when>
						<c:when test="${v.ticket_way==2}">快递</c:when>
					</c:choose>
				</ec:column>
				<ec:column property="order_code" title="快递单号">${v.order_code}</ec:column>
				<ec:column property="ticket_user" title="领取人">${v.ticket_user}</ec:column>
				<ec:column property="payment_status" title="回款状态">
					<c:choose>
						<c:when test="${v.status==4}">部分回款</c:when>
						<c:when test="${v.status==5}">全部回款</c:when>
						<c:otherwise>未回款</c:otherwise>
					</c:choose>	
				</ec:column>
			</ec:row>
		</ec:table>
	</body>
</html>